package com.ruoyi.project.blog.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.blog.domain.BFriendLink;
import com.ruoyi.project.blog.mapper.BFriendLinkMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.blog.mapper.BNavigationMapper;
import com.ruoyi.project.blog.domain.BNavigation;
import com.ruoyi.project.blog.service.IBNavigationService;

/**
 * 网站导航Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-10
 */
@Service
public class BNavigationServiceImpl extends ServiceImpl<BNavigationMapper, BNavigation>  implements IBNavigationService
{
    @Autowired
    private BNavigationMapper bNavigationMapper;

    /**
     * 查询网站导航
     * 
     * @param id 网站导航主键
     * @return 网站导航
     */
    @Override
    public BNavigation selectBNavigationById(Long id)
    {
        return bNavigationMapper.selectBNavigationById(id);
    }

    /**
     * 查询网站导航列表
     * 
     * @param bNavigation 网站导航
     * @return 网站导航
     */
    @Override
    public List<BNavigation> selectBNavigationList(BNavigation bNavigation)
    {
        return bNavigationMapper.selectBNavigationList(bNavigation);
    }

    /**
     * 新增网站导航
     * 
     * @param bNavigation 网站导航
     * @return 结果
     */
    @Override
    public int insertBNavigation(BNavigation bNavigation)
    {
        bNavigation.setCreateTime(DateUtils.getNowDate());
        return bNavigationMapper.insertBNavigation(bNavigation);
    }

    /**
     * 修改网站导航
     * 
     * @param bNavigation 网站导航
     * @return 结果
     */
    @Override
    public int updateBNavigation(BNavigation bNavigation)
    {
        bNavigation.setUpdateTime(DateUtils.getNowDate());
        return bNavigationMapper.updateBNavigation(bNavigation);
    }

    /**
     * 批量删除网站导航
     * 
     * @param ids 需要删除的网站导航主键
     * @return 结果
     */
    @Override
    public int deleteBNavigationByIds(Long[] ids)
    {
        return bNavigationMapper.deleteBNavigationByIds(ids);
    }

    /**
     * 删除网站导航信息
     * 
     * @param id 网站导航主键
     * @return 结果
     */
    @Override
    public int deleteBNavigationById(Long id)
    {
        return bNavigationMapper.deleteBNavigationById(id);
    }
}
